package com.example.springbatch;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.simple.ParameterizedRowMapper;

import com.example.domain.Book;

public class BookRowMapper implements ParameterizedRowMapper<Book> {

	@Override
	public Book mapRow(ResultSet rs, int rowNum) throws SQLException {
		Book book=new Book();
		book.setId(rs.getString(1));
		book.setName(rs.getString(2));
		return book;
	}

}
